package com.qf.task;

import com.qf.websocket.MyCommandHandler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author ztf
 * @Date 20:32 2022/1/7
 * 检查设备在线状态
 **/
@Component
@EnableScheduling
public class DevicePowerTask {
    /**
     * 监测心跳
     */
    @Scheduled(fixedRate = 60000)
    public void checkHeartBeat(){
        System.err.println("准备检查设备在线状态");
        MyCommandHandler.checkStatus();
    }
}
